Release 10.1A: OpenEdge Getting Started:
Object-oriented Programming


Overriding data in classes and procedures

It is invalid to have a data member in a subclass with the same name as any PUBLIC or PROTECTED data member in one of its super classes, regardless of whether the types of the two data members match or not. Thus, it is impossible to define data in a subclass that might override (shadow) or conflict with data in a super class without returning an error from the compiler.

Remember that this restriction applies to definitions at the level of the class. It is permissible to define a variable within a method that duplicates (and therefore shadows) a data member of the same name defined outside the method. Essentially, defining a variable in a method with the same name as a class data member in the class hierarchy makes the class data member invisible and directly inaccessible to the method.


Copyright © 2005 Progress Software Corporation
www.progress.com
Voice: (781) 280-4000
Fax: (781) 280-4095